/*
jQuery(document).ready
(
    function()
    { 
	jQuery("#jid77").click
	(
	    function()
	    { 
		jQuery("#judge77").animate
		(
		    {
			height: "500px"
		    },
		    1000
		);
	    }
	);
	    
	//for( o in JOPEN ) jQuery( JOPEN[o] ).scrollLeft(); 
    }
    
);
 */

OPENJ = []
sander = []

jQuery(document).ready
(
    function()
    {     
	for( i = 0; i < JID.length; i ++ )
	{
	    var a = document.getElementById("jid"+JID[i])
	    b = document.getElementById("judge"+JID[i])
	    b.style.left = offsets( JID[i] ) + "px"
	    a.JID = i
	    a.JOPEN = false
	    a.JREADY = true
	    
	    jQuery( "#jid"+JID[i] ).click
	    (
		function()
		{
		    this.JOPEN = ! this.JOPEN
		    janime( this )
		}
	    );
	}
    }
    
);

function offsets( pid )
{
    var ofset = 0
    var a = document.getElementById("jid"+pid)
    while( (a = a.offsetParent) != null )
    {
	ofset += a.offsetLeft
    }

    return ofset
}

function janime( a )
{
    c = document.getElementById("judge" + JID[a.JID] )
    b = jQuery("#judge" + JID[a.JID] );
    d = b.height();
    if ( ! a.JOPEN ) { b.hide(); return }
    else if ( a.JREADY )
    {
	b.show()
	c.style.height = "0px";
	a.JREADY = false
	jQuery("#judge" + JID[a.JID] ).animate
	(
	    {
		height: d + "px"
	    },
	    300, function(){ a.JREADY = true }
	);
    }
}